<html>
<title>
文字修仙
</title>
<style>
body{
  background-color:black;
  color:white;  
}
#cen{
 padding-top:150px;
}
#login{
width:15%;
hight:40px;
}
</style>
<body>
<center>
<div id="cen">
<h2>欢迎界面</h2>
<br/>
<br/>
<diV>
<span>你好：尊敬的 ADMIN 用户</span>
<br/>
<br/>
<span>
境界
</span>
<span>
金钱
</span>

<span>
灵石
</span>
<span>
灵兽
</span>
<span>
装备
</span>
<br/>
<br/>
<br/>
<span>
当前经验：
<input type="text" id="jy"/>
</span>

<br/>
<br/>
<span>
<button id="add" onclick="add()">添加经验</button>
</span>
<br/>
<br/>
<span>
<button id="tp" onclick="tp()">突破</button>
</span>
</div>
</div>
</center>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
 <script>
 
  document.getElementById("jy").innerHTML=window.localStorage.getItem("jy");
 
  function add(){
  // 获取当前经验
   var jy = window.localStorage.getItem("jy");
   var newJy = Number(jy)+1000;
   window.localStorage.setItem("jy",newJy);
   alert("新增经验1000点");
   document.getElementById("jy").innerHTML=newJy;
 }
 
 function tp(){
		alert("经验不足");
 }
 </script>
</html>